﻿using Prism.Ioc;
using Prism.Modularity;
using Prism.Regions;
using PrismModule.MS.DeviceParam.Views;
using PrismModule.MultyStationRobot.Views;

namespace PrismModule.MS.DeviceParam
{
    public class DeviceParamModule : IModule
    {
        public void OnInitialized(IContainerProvider containerProvider)
        {
            var regionManager = containerProvider.Resolve<IRegionManager>();//解耦
            //右侧按钮导航注册为discovery 模式，加载的时候直接注册，适合界面不用变更
            regionManager.RegisterViewWithRegion("MSSelectCardRegion", typeof(PUC_CardSelected));//左侧当行按钮
            regionManager.RegisterViewWithRegion("MSWorkPointSpeedParamRegion", typeof(PUC_MS_WorkPointParam));//左侧当行按钮

            regionManager.RegisterViewWithRegion("MSDeviceParamRegion", typeof(PUC_MS_DeviceParam));//左侧当行按钮
            regionManager.RegisterViewWithRegion("MSWorkConfigParamRegion", typeof(PUC_MS_WorkConfigParam));//左侧当行按钮
        }

        public void RegisterTypes(IContainerRegistry containerRegistry)
        {
            containerRegistry.RegisterForNavigation<PUC_MS_DeviceParam>();
            containerRegistry.RegisterForNavigation<PUC_MS_Param>();
            containerRegistry.RegisterForNavigation<PUC_MS_WorkConfigParam>();
            containerRegistry.RegisterForNavigation<PUC_MS_WorkPointParam>();
            containerRegistry.RegisterForNavigation<PUC_CardSelected>();
        }
    }
}